package com.android.panballgame;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.view.View.OnClickListener;
import android.widget.ImageButton;

public class PBOption extends Activity {
	final PBEngine engine = new PBEngine();	
	
	@Override
	public void onCreate(Bundle savedInstanceState){
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
		setContentView(R.layout.option);
		
		getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);//화면 꺼짐 방지
		
		ImageButton setting = (ImageButton)findViewById(R.id.btnsetting);
		ImageButton help = (ImageButton)findViewById(R.id.btnhelp);
		ImageButton dev = (ImageButton)findViewById(R.id.btndev);
		
		setting.getBackground().setAlpha(PBEngine.MENU_BUTTON_ALPHA);
		setting.setHapticFeedbackEnabled(PBEngine.HAPTIC_BUTTON_FEEDBACK);
		
		help.getBackground().setAlpha(PBEngine.MENU_BUTTON_ALPHA);
		help.setHapticFeedbackEnabled(PBEngine.HAPTIC_BUTTON_FEEDBACK);
		
		dev.getBackground().setAlpha(PBEngine.MENU_BUTTON_ALPHA);
		dev.setHapticFeedbackEnabled(PBEngine.HAPTIC_BUTTON_FEEDBACK);
		
		setting.setOnClickListener(new OnClickListener(){//option 버튼
			public void onClick(View v){
				Intent setting = new Intent(getApplicationContext(), PBSetting.class);
				PBOption.this.startActivity(setting);
			}
		});
		
		help.setOnClickListener(new OnClickListener(){//help 버튼
			public void onClick(View v){
				Intent help = new Intent(getApplicationContext(), PBHelp.class);
				PBOption.this.startActivity(help);
			}
		});
		
		dev.setOnClickListener(new OnClickListener(){//dev 버튼
			public void onClick(View v){
				Intent dev = new Intent(getApplicationContext(), PBDev.class);
				PBOption.this.startActivity(dev);
			}
		});
	}
}
